<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: CATItem</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">CATItem</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/app/classes/cat/cat_item_rb.html">
                app/classes/cat/cat_item.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="IRTItem.html">
                IRTItem
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">
    <div id="diagram">
      <map id="map" name="map">
  <area shape="rect" coords="5,101,77,149"      href="CATItem.html" alt="CATItem" />
  <area shape="rect" coords="5,5,77,53"      href="IRTItem.html" alt="IRTItem" />
</map>
<img src="../dot/f_3.png" usemap="#map" border="0" alt="dot/f_3.png">
    </div>

    <div id="description">
      <ul>
<li>cat_item.rb

</li>
<li>Copyright (C) 2010 Embian Inc.

<p>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
</p>
<p>
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
</p>
<p>
You should have received a copy of the GNU General Public License along
with This program. If not, see &lt;<a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/&gt;.
</p>
</li>
<li>Extends <a href="IRTItem.html">IRTItem</a> class

</li>
<li>Author: KyoungMo Yang(E-mail : mo@embian.com)

</li>
<li>Modified: 2010-12-01

</li>
<li>References: <a href="IRTItem.html">IRTItem</a>, <a
href="CATModel.html">CATModel</a>

</li>
</ul>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000019">I_of</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000019" class="method-detail">
        <a name="M000019"></a>

        <div class="method-heading">
          <a href="#M000019" class="method-signature">
          <span class="method-name">I_of</span><span class="method-args">(theta, cat_model)</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * Calculates information(I)
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * [new_id] : item id
 * [q_no] : question No.
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * An instance of IRTItem class
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * Formula : I(Θ) = a^2*P(Θ)Q(Θ)
             P(Θ) = c + (1-c) * (1 / (1 + exp(-1.7*a*(Θ-b))))
             Q(Θ) = 1 - P(Θ)
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000019-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/cat/cat_item.rb, line 37</span>
37:   <span class="ruby-keyword kw">def</span> <span class="ruby-constant">I_of</span>(<span class="ruby-identifier">theta</span>, <span class="ruby-identifier">cat_model</span>)
38:     <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Invalid Paramter : 'cat_model' is an instance of CATModel&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cat_model</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">CATModel</span>
39:     <span class="ruby-identifier">p</span> = <span class="ruby-identifier">cat_model</span>.<span class="ruby-identifier">fun_logistic</span>(<span class="ruby-identifier">theta</span>, <span class="ruby-ivar">@irt_a</span>, <span class="ruby-ivar">@irt_b</span>, <span class="ruby-ivar">@irt_c</span>)
40:     <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@irt_a</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@irt_a</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">*</span> (<span class="ruby-value">1.0</span> <span class="ruby-operator">-</span><span class="ruby-identifier">p</span>)
41:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>